package com.xinwangai.jingbai.pojo.VO;

import lombok.Data;

import java.util.List;

/**
 * 分页结果
 *
 * @author guo.wenliang
 * @since 2025/8/13 18:02
 */
@Data
public class PageResult<T> {
    private List<T> list;
    private Integer total;
    private Integer pageNum;
    private Integer pageSize;
    private Integer pages;
    
    public PageResult(List<T> list, Integer total, Integer pageNum, Integer pageSize) {
        this.list = list;
        this.total = total;
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.pages = (total + pageSize - 1) / pageSize;
    }
} 